package test2.experiment8;

import java.util.Scanner;

public class Circle implements CalculateAble {
    private double radius;

    public Circle(double radius) {
        this.radius = radius;
    }

    public double getRadius() {
        return radius;
    }

    public void setRadius(double radius) {
        this.radius = radius;
    }

    @Override
    public double calculate() {
        return 3.14 * Math.pow(radius, 2);
    }

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        Circle circle = new Circle(scanner.nextDouble());
        scanner.close();
        System.out.println("Circle Area = " + circle.calculate());

    }
}

interface CalculateAble {
    double calculate();
}
